/**
 * @param {number} n
 * @return {number}
 */
var countHousePlacements = function(n) {
  let arr = [1, 1];
  for(let i = 0; i < n + 2; i++) {
    if(i == 0 || i == 1) {
      continue;
    } else {
      arr[i] = arr[i - 1] + arr[i - 2];
      if(arr[i] > 1000000000 + 7) {
        arr[i] = arr[i] % (1000000000 + 7);
      }
    }
  }
  if(arr[n + 1] * arr[n + 1] > 9007199254740991) {
    let result = 0, index = arr[n + 1] % 100000;
    result = arr[n + 1] * index;
    for(let i = index; i < arr[n + 1]; i += 100000) {
      result += arr[n + 1] * 100000;
      if(result > 1000000000 + 7) result %= (1000000000 + 7);
    }
    return result;
  }
  return (arr[n + 1]) * (arr[n + 1]) % (1000000000 + 7);
};
let n = 1;
console.log(countHousePlacements(n)); // 2 = 4
n = 2;
console.log(countHousePlacements(n)); // 3  =9
n = 3;
console.log(countHousePlacements(n)); // 5 25
n = 4;
console.log(countHousePlacements(n)); // 8 25
n = 5;
console.log(countHousePlacements(n)); // 13 169
n = 1000;
console.log(countHousePlacements(n)); // 500478595
n = 9468;
console.log(countHousePlacements(n)); // 452249287
n = 2432;
console.log(countHousePlacements(n)); // 7454056
n = 1549;
console.log(countHousePlacements(n)); // 379317617
n = 8672;
console.log(countHousePlacements(n)); // 70698664
